package com.xmy.cultivate.mapper;

import com.xmy.cultivate.entity.WecharsBind;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * <p>
 * 微信绑定 Mapper 接口
 * </p>
 *
 * @author min
 * @since 2023-01-12
 */
public interface WecharsBindMapper extends BaseMapper<WecharsBind> {

    @Select("select t1.*,t2.name as student_name from wechars_bind as t1 INNER JOIN student as t2 on t1.student_id = t2.id where openid = '${openid}' and t2.deleted = 0")
    public List<WecharsBind> getWecharsBindCount(@Param("openid") String openid);
}
